<?php

namespace app\admin\model;

use think\Model;
use think\model\concern\SoftDelete;

class PohtoListImage extends Model
{
    use SoftDelete;
    protected $name = 'car_photo_image'; //表名
    protected $autoWriteTimestamp = true;
    // 定义时间戳字段名
    protected $dateFormat = 'Y/m/d H:i:s';
    protected $createTime = 'create_at';
    protected $updateTime = 'update_at';
    protected $deleteTime='delete_at';

    public function info()
    {
        return $this->hasOne(PohtoList::class, 'id', 'photo_id')->with(['tanName', 'userInfo']);
    }

//    public function getImagePathAttr($value)
//    {
//        if($value) {
//            return config('app.baseUrl').signUrl($value);
//        }
//        return '';
//    }
}